<script setup lang="ts">
import { ref } from 'vue'
import { icon } from '@/util/icons'
defineProps<{
  suffix: string
}>()

const iconMap = ref({
  '.png': 'JPG',
  '.txt': 'TXT',
  '.jpg': 'JPG',
  '.pdf': 'PDF',
  '.mp4': 'VideoIcon',
  '.zip': 'ZIP',
  '.mp3': 'AudioIcon',
  '.ppt': 'PPT',
  '.html': 'CodeIcon',
  '.vue': 'CodeIcon',
  '.css': 'CodeIcon',
  '.ts': 'CodeIcon',
  '.js': 'CodeIcon',
  '.json': 'CodeIcon',
  '.java': 'CodeIcon'
})
</script>
<template>
  <component :is="(icon as any)[(iconMap as any)[suffix]] || icon.UnknownFile"></component>
</template>
<style scoped></style>
